package com.example.config;

import com.example.controller.RobotController;
import com.example.properties.RobotProperties;
import com.example.service.RobotService;
import com.example.service.RobotServiceImpl;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@EnableConfigurationProperties(RobotProperties.class) // 开启注解绑定类并放入容器中
@Configuration
public class RobotAutoConfiguration {

    @Bean
    public RobotController getRobotController(){
        return new RobotController();
    }

    @Bean
    public RobotService getRobotService(){
        return new RobotServiceImpl();
    }

}
